package cn.cvs.dao;

import cn.cvs.entity.Supplier;
import org.apache.ibatis.annotations.Param;

import java.util.List;





    public interface SupplierMapper {

        /**
         * 增加用户信息
         * @param supplier
         * @return
         * @throws Exception
         */
        public int add(Supplier supplier)throws Exception;

        /**
         * 通过条件查询-providerList
         * @param supName
         * @param supCode
         * @param pageBegin
         * @param pageSize
         * @return
         * @throws Exception
         */
        public List<Supplier> selectList(@Param("supName") String supName,
                                         @Param("supCode") String supCode,
                                         @Param("pageBegin") Integer pageBegin,
                                         @Param("pageSize") Integer pageSize)throws Exception;

        /**
         * 获取供应商列表
         * @return
         * @throws Exception
         */
        public List<Supplier> selectSimpleList()throws Exception;



        /**
         * 通过条件查询-供应商表记录数
         * @param supName
         * @param supCode
         * @return
         * @throws Exception
         */
        public int selectCount(@Param("supName") String supName, @Param("supCode") String supCode)throws Exception;

        /**
         * 通过供应商id删除供应商信息
         * @param id
         * @return
         * @throws Exception
         */
        public int deleteById(@Param("id") Integer id)throws Exception;

        /**
         * 根据provider id 获取供应商信息
         * @param id
         * @return
         * @throws Exception
         */
        public Supplier selectById(@Param("id") Integer id)throws Exception;

        /**
         * 修改供应商
         * @param supplier
         * @return
         * @throws Exception
         */
        public int update(Supplier supplier)throws Exception;

    }


